package com.tyd.cams.utils;

import android.content.SharedPreferences;

import com.tyd.cams.CamsApplication;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import static android.content.Context.MODE_PRIVATE;

/**
 * @author: TYD
 * @作者: 唐YaDong
 * @date: 2021/3/3
 * @时间：
 * @description：OkHttpUtil
 * @描述：OkHttpUtil
 * @版本：1.0
 */

public class SPUtils {

//    private static String IP = "http://192.168.1.189:8080";
//    private static String IP = "http://192.168.137.1:8080";
    private static String IP= "http://cams.alphaunion.cn";
    private static String CETHost = "cache.neea.edu.cn";
    private static String CETReferer = "http://cet.neea.edu.cn/";
    private static String CETGet = "http://cache.neea.edu.cn/cet/query";
    static SharedPreferences SPF = CamsApplication.context.getSharedPreferences("SP", MODE_PRIVATE);

    public static String getIP() {
        return IP;
    }

    public static String getCETHost() {
        return CETHost;
    }

    public static String getCETReferer() {
        return CETReferer;
    }

    public static String getCETGet() {
        return CETGet;
    }

    public static String getToken() {
        return SPF.getString("token", "");
    }

    public static String getUserInfo() {
        return SPF.getString("userInfo", "");
    }

    public static String getUsername() {
        return SPF.getString("username", "");
    }

    public static String getUsertype() {
        return SPF.getString("usertype", "");
    }

    public static String getaccount() {
        return SPF.getString("account", "");
    }

}